package com.sample.mapping;

import javax.persistence.Column;

public class Video<T> extends AbstractMapping<T> {

	@Column(name="user_id")
	private T userId;
	
	@Column(name="post_id")
	private T postId;
	
	@Column(name="title")
	private String title;
	
	@Column(name="body")
	private String body;
	
	@Column(name="url_loc")
	private String urlLocation;
		
	public T getUserId() {
		return userId;
	}	
	
	public T getPostId() {
		return postId;
	}

	public void setPostId(T postId) {
		this.postId = postId;
	}

	public void setUserId(T userId) {
		this.userId = userId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}
	
	public String getUrlLocation() {
		return urlLocation;
	}

	public void setUrlLocation(String urlLocation) {
		this.urlLocation = urlLocation;
	}

	@Override
	public int hashCode() {
		return getId().hashCode();
	}

	public boolean equals(Video<T> video) {
		if (this.getId() != video.getId()) {
			return false;
		}
		return this.getId().equals(video.getId());
	}
	
}
